package org.example.innovate.controller;

import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletRequest;
import org.example.innovate.common.CommonResponse;
import org.example.innovate.service.CollectionService;
import org.example.innovate.vo.DishOneVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;
import java.util.List;
import org.example.innovate.domain.Collections;

@RestController
@RequestMapping("/collection")
@Valid
public class CollectionConytoller {
    @Resource
    private CollectionService collectionService;

    @PostMapping("/getall")
    public CommonResponse<List<DishOneVo>> getAll(HttpServletRequest request) {
        return collectionService.getAll(request);
    }
}
